\(\int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx\) [73]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 25 \[ \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx=-\frac {\arcsin (x)}{2}-\frac {1}{2} \text {arctanh}\left (\frac {x}{\sqrt {1-x^2}}\right ) \]

[Out]

-1/2*arcsin(x)-1/2*arctanh(x/(-x^2+1)^(1/2))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {399, 222, 385, 213} \[ \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx=-\frac {\arcsin (x)}{2}-\frac {1}{2} \text {arctanh}\left (\frac {x}{\sqrt {1-x^2}}\right ) \]

[In]

Int[Sqrt[1 - x^2]/(-1 + 2*x^2),x]

[Out]

-1/2*ArcSin[x] - ArcTanh[x/Sqrt[1 - x^2]]/2

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 399

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Dist[b/d, Int[(a + b*x^n)^(p - 1), x]
, x] - Dist[(b*c - a*d)/d, Int[(a + b*x^n)^(p - 1)/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c
 - a*d, 0] && EqQ[n*(p - 1) + 1, 0] && IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = -\left (\frac {1}{2} \int \frac {1}{\sqrt {1-x^2}} \, dx\right )+\frac {1}{2} \int \frac {1}{\sqrt {1-x^2} \left (-1+2 x^2\right )} \, dx \\ & = -\frac {1}{2} \sin ^{-1}(x)+\frac {1}{2} \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\frac {x}{\sqrt {1-x^2}}\right ) \\ & = -\frac {1}{2} \sin ^{-1}(x)-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {1-x^2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.48 \[ \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx=\arctan \left (\frac {\sqrt {1-x^2}}{1+x}\right )-\frac {1}{2} \text {arctanh}\left (\frac {x}{\sqrt {1-x^2}}\right ) \]

[In]

Integrate[Sqrt[1 - x^2]/(-1 + 2*x^2),x]

[Out]

ArcTan[Sqrt[1 - x^2]/(1 + x)] - ArcTanh[x/Sqrt[1 - x^2]]/2

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(55\) vs. \(2(19)=38\).

Time = 2.35 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.24

method result size
pseudoelliptic \(\frac {\ln \left (\frac {-x +\sqrt {-x^{2}+1}}{x}\right )}{4}-\frac {\ln \left (\frac {x +\sqrt {-x^{2}+1}}{x}\right )}{4}+\frac {\arctan \left (\frac {\sqrt {-x^{2}+1}}{x}\right )}{2}\) \(56\)
trager \(\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \sqrt {-x^{2}+1}+x \right )}{2}-\frac {\ln \left (-\frac {2 x \sqrt {-x^{2}+1}+1}{2 x^{2}-1}\right )}{4}\) \(58\)
default \(\frac {\sqrt {2}\, \left (\frac {\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{4}-\frac {\sqrt {2}\, \arcsin \left (x \right )}{4}-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (1-\left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}\right ) \sqrt {2}}{\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{4}\right )}{2}-\frac {\sqrt {2}\, \left (\frac {\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{4}+\frac {\sqrt {2}\, \arcsin \left (x \right )}{4}-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (1+\left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}\right ) \sqrt {2}}{\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{4}\right )}{2}\) \(187\)

[In]

int((-x^2+1)^(1/2)/(2*x^2-1),x,method=_RETURNVERBOSE)

[Out]

1/4*ln((-x+(-x^2+1)^(1/2))/x)-1/4*ln((x+(-x^2+1)^(1/2))/x)+1/2*arctan((-x^2+1)^(1/2)/x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (19) = 38\).

Time = 0.24 (sec) , antiderivative size = 74, normalized size of antiderivative = 2.96 \[ \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx=\arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) + \frac {1}{4} \, \log \left (-\frac {x^{2} + \sqrt {-x^{2} + 1} {\left (x + 1\right )} - x - 1}{x^{2}}\right ) - \frac {1}{4} \, \log \left (-\frac {x^{2} - \sqrt {-x^{2} + 1} {\left (x - 1\right )} + x - 1}{x^{2}}\right ) \]

[In]

integrate((-x^2+1)^(1/2)/(2*x^2-1),x, algorithm="fricas")

[Out]

arctan((sqrt(-x^2 + 1) - 1)/x) + 1/4*log(-(x^2 + sqrt(-x^2 + 1)*(x + 1) - x - 1)/x^2) - 1/4*log(-(x^2 - sqrt(-
x^2 + 1)*(x - 1) + x - 1)/x^2)

Sympy [F]

\[ \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx=\int \frac {\sqrt {- \left (x - 1\right ) \left (x + 1\right )}}{2 x^{2} - 1}\, dx \]

[In]

integrate((-x**2+1)**(1/2)/(2*x**2-1),x)

[Out]

Integral(sqrt(-(x - 1)*(x + 1))/(2*x**2 - 1), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 110 vs. \(2 (19) = 38\).

Time = 0.29 (sec) , antiderivative size = 110, normalized size of antiderivative = 4.40 \[ \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx=-\frac {1}{8} \, \sqrt {2} {\left (2 \, \sqrt {2} \arcsin \left (x\right ) - \sqrt {2} \log \left (\frac {1}{4} \, \sqrt {2} + \frac {\sqrt {2} \sqrt {-x^{2} + 1}}{{\left | 4 \, x + 2 \, \sqrt {2} \right |}} + \frac {1}{{\left | 4 \, x + 2 \, \sqrt {2} \right |}}\right ) + \sqrt {2} \log \left (-\frac {1}{4} \, \sqrt {2} + \frac {\sqrt {2} \sqrt {-x^{2} + 1}}{{\left | 4 \, x - 2 \, \sqrt {2} \right |}} + \frac {1}{{\left | 4 \, x - 2 \, \sqrt {2} \right |}}\right )\right )} \]

[In]

integrate((-x^2+1)^(1/2)/(2*x^2-1),x, algorithm="maxima")

[Out]

-1/8*sqrt(2)*(2*sqrt(2)*arcsin(x) - sqrt(2)*log(1/4*sqrt(2) + sqrt(2)*sqrt(-x^2 + 1)/abs(4*x + 2*sqrt(2)) + 1/
abs(4*x + 2*sqrt(2))) + sqrt(2)*log(-1/4*sqrt(2) + sqrt(2)*sqrt(-x^2 + 1)/abs(4*x - 2*sqrt(2)) + 1/abs(4*x - 2
*sqrt(2))))

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 118 vs. \(2 (19) = 38\).

Time = 0.28 (sec) , antiderivative size = 118, normalized size of antiderivative = 4.72 \[ \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx=-\frac {1}{4} \, \pi \mathrm {sgn}\left (x\right ) - \frac {1}{2} \, \arctan \left (-\frac {x {\left (\frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{2 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right ) - \frac {1}{4} \, \log \left ({\left | -\frac {x}{\sqrt {-x^{2} + 1} - 1} + \frac {\sqrt {-x^{2} + 1} - 1}{x} + 2 \right |}\right ) + \frac {1}{4} \, \log \left ({\left | -\frac {x}{\sqrt {-x^{2} + 1} - 1} + \frac {\sqrt {-x^{2} + 1} - 1}{x} - 2 \right |}\right ) \]

[In]

integrate((-x^2+1)^(1/2)/(2*x^2-1),x, algorithm="giac")

[Out]

-1/4*pi*sgn(x) - 1/2*arctan(-1/2*x*((sqrt(-x^2 + 1) - 1)^2/x^2 - 1)/(sqrt(-x^2 + 1) - 1)) - 1/4*log(abs(-x/(sq
rt(-x^2 + 1) - 1) + (sqrt(-x^2 + 1) - 1)/x + 2)) + 1/4*log(abs(-x/(sqrt(-x^2 + 1) - 1) + (sqrt(-x^2 + 1) - 1)/
x - 2))

Mupad [B] (verification not implemented)

Time = 5.00 (sec) , antiderivative size = 85, normalized size of antiderivative = 3.40 \[ \int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx=-\frac {\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}-1\right )\,1{}\mathrm {i}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-\frac {\sqrt {2}}{2}}\right )}{4}+\frac {\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}+1\right )\,1{}\mathrm {i}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {2}}{2}}\right )}{4}-\frac {\mathrm {asin}\left (x\right )}{2} \]

[In]

int((1 - x^2)^(1/2)/(2*x^2 - 1),x)

[Out]

log((2^(1/2)*((2^(1/2)*x)/2 + 1)*1i + (1 - x^2)^(1/2)*1i)/(x + 2^(1/2)/2))/4 - log((2^(1/2)*((2^(1/2)*x)/2 - 1
)*1i - (1 - x^2)^(1/2)*1i)/(x - 2^(1/2)/2))/4 - asin(x)/2